//*****************************************************************************
//
// ABEC3 Lumped Element File
// Project: Testing Couplers
//
//*****************************************************************************

// Simple version of Standard Model of
// electro-dynamical loudspeaker driver

// System 1 is an electro-mechano-acoustic lumped model with ideal transformers
// for the diaphragms front and rear.
// System 2 is an electro-mechano lumped model where the acoustic loads are
// modeled by an equivalent component Rma, and there are no couplers.


Def_Driving
  Value=1.0

// You can specify a global filter
Filter
  f0=1kHz  
  { b0=1;  a0=1;  b1=0.1;   b2=1 }


System 'S1'
  // Electrical part
  Resistor 'Re' R=5.5ohm  Node=10=20
  Coil     'Le' L=2.44mH  Node=20=30
  // Motor
  Gyrator 'Gyr' Bl=23.3N/A Node=30=0=100=0
  // Mechanical part
  MechCompliance 'Cms' Cm=43e-6m/N  Rm=21Ns/m  Node=100=110
  MechMass       'Mms'  Mm=118.5g              Node=110=120
  // Mechanic-Acoustic coupling done by two Couplers
  // One for the front and one for the rear side.
  // Couplers cannot be concatenated (in ABEC), so we put a little Resistor "Rm1"
  // in-between. Rm1 we can then use for measuring
  Coupler        'SD1' dD=340mm     Node=120=150=300
  MechResistance 'Rm1' Rm=0.1Ns/m   Node=150=151
  Coupler        'SD2' dD=340mm     Node=151=0=0=400
  // Acoustical part
  AcouResistance    'Ra1'  Node=300=0  Ra=1e3Pas/m3  // Front side
  AcouResistance    'Ra2'  Node=400=0  Ra=1e3Pas/m3  // Rear side

// Alternatively, without couplers but with equivalent resistor Rma
// Instead of Coupler + Ra1 + Ra2 we implement the equivalent mechanical
// resistor:
//   dD=0.34;   SD=pi*(dD/2)^2;  Ra=2*1e3  with  Ra = (F/SD)/(v*SD) = Rm/SD^2
//   Rm=Ra*SD^2 = 16.48Ns/m
System 'S2'
  // Electrical part
  Resistor 'Re' R=5.5ohm   Node=10=20
  Coil     'Le' L=2.44mH   Node=20=30
  // Motor
  Gyrator 'Gyr' Bl=23.3N/A Node=30=0=100=0
  // Mechanical part
  MechCompliance 'Cms'  Cm=43e-6m/N  Rm=21Ns/m  Node=100=110
  MechMass       'Mms'  Mm=118.5g               Node=110=120
  MechResistance 'Rm1'  Rm=0.1Ns/m              Node=120=121
  // Equivalent acoustic part
  MechResistance 'Rma'  Rm=16.48Ns/m            Node=121=0
